/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.ieslaferreria.creditsintesis.logicgame.actions;

/**
 * Clase que guarda los cambios de estados.
 * @author josep
 */
public class StateChangedEvent extends RmiEvent{
    private String Objectname=null;
    private int oldState;
    private int newState;

    public StateChangedEvent(String objectname, int oldState, int newState, String eventGeneratorPontName) {
        super(eventGeneratorPontName);
//        super(null);
        this.Objectname=objectname;
        this.oldState = oldState;
        this.newState = newState;
    }
    public StateChangedEvent(int oldState, int newState, String eventGeneratorPontName) {
        super(eventGeneratorPontName);
        this.oldState = oldState;
        this.newState = newState;
    }
    public StateChangedEvent(int newState, String eventGeneratorPontName) {
        super(eventGeneratorPontName);
        this.newState = newState;
    }

    /**
     * @return the oldState
     */
    public int getOldState() {
        return oldState;
    }
    /**
     * @return the newState
     */
    public int getNewState() {
        return newState;
    }

    /**
     * @return the Objectname
     */
    public String getObjectname() {
        return Objectname;
    }

}
